package com.xiaofeng.pochi.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaofeng.pochi.common.Page;
import com.xiaofeng.pochi.pojo.ShopUser;
import com.xiaofeng.pochi.pojo.dto.ShopUserBindDto;
import com.xiaofeng.pochi.pojo.vo.ShopUserStatisticVo;
import com.xiaofeng.pochi.pojo.vo.ShopUserVo;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/08/21/21:48
 * @Description:
 */
public interface ShopUserService extends IService<ShopUser> {

    ShopUser getByOpenId(String username);

    /**
     * 注册
     * */
    void register(ShopUser toShopUser);

    /**
     * 绑定手机号
     * */
    ShopUser bindUser(ShopUserBindDto shopUserBindDto);

    /**
     * 分页查询
     * */
    Page<ShopUser> getByPage(Page<ShopUser> page);

    /**
     * 根据id查询
     * */
    ShopUserVo get(Long id);

    void delete(Long id);

    /**
     *  解封
     * */
    void enableById(Long id);


    /**
     * 封禁
     * */
    void disableById(Long id);

    /**
     * 查询累计消费最多的前十个用户
     * @return
     */
    List<ShopUserStatisticVo> getTopStatistic();

}
